package cn.imu.service.impl;

import cn.imu.entity.User;
import cn.imu.mapper.UserMapper;
import cn.imu.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Autowired
    private User user;
    @Override
    public User selectUserByUsername(String username) {
        user.setUsername(username);
        return userMapper.selectUserByUsername(user);
    }

   /* @Override
    public int insertUser(User user) {
        return 0;
    }*/

    @Override
    public int insertUser(User user) {
        return  userMapper.insertUser(user);
    }
}
